home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1993 September / September 93.iso / Archives / Utilities / System / FKey / FKeys / Multi Find-Replace FKEY / Readme Multi Find-Replace(ttxt) < prev    next >
Text File  |  1992-10-26  |  11KB  |  193 lines

  1.  
  2. Multi Find-Replace
  3.  
  4.  
  5.  
  6. Welcome to Multi Find-Replace !
  7.  
  8. Version 1.4  © Gaspard Gendreau, October 1992.
  9.  
  10.  
  11. What is Multi Find-Replace?
  12. Multi Find-Replace  is an FKEY that performs a succession of “Find and Replace” on the text of the current clipboard.
  13.  
  14.  
  15. Do You need Multi Find-Replace ?
  16. You need Multi Find-Replace  if you perform often the same succession of “Find&Replace”. It is particularly useful to exchange Macintosh text to/from DOS in conjunction with DosMounter or any other tool that lets read and write directly on DOS disk.
  17.  
  18.  
  19. What is an FKEY?
  20. An FKEY (Function Key) is a piece of software that a Mac user would never expect to find on a Macintosh: if the user has not learn  the existence of an FKEY, he will never guess it. Pretty non user-friendly? This is maybe why Apple does not promote so much FKEYs.
  21.  
  22. An FKEY is independent of any application: once installed, it can be activated at any moment from any application by holding down Command-Shift-number. The advantages of FKEYs are numerous: FKEYs are not memory resident, they are not loaded at boot time, they don’t patch any code, and thus don’t increase the chances of extension conflicts.
  23.  
  24. But FKEYs have their drawbacks: they cannot be installed just by dragging a file into the System folder, nor over the system file like fonts (for System 7 users), which is something Apple really forgot!
  25. Moreover, as the alphabet has ten numbers, you can have up to ten FKEYs (actually, ‘1’ is already used to eject the internal floppy in case of emergency, ‘2’ for the external floppy, ‘3’ to take a picture of the screen, and ‘4’ to print a picture of the screen to an ImageWriter).
  26.  
  27. Fortunately, tools likeSuitcase  let you install more than ten FKEYs.
  28.  
  29.  
  30. How to install Multi Find-Replace ?
  31. The complete package of Multi Find-Replace  contains five files:
  32. •    Readme Multi Find-Replace(Word)    read me file (MS Word format)
  33. •    Readme Multi Find-Replace(ttxt)    read me file (TeachText)
  34. •    Multi Find-Replace FKEY 1.4    contains the FKEY
  35. •    Multi Find-Replace definition    definition file(s)
  36. •    FKEY Installer    FKEY installer from Mike Gleason
  37.  
  38. You may have several files “Multi Find-Replace definition”, each of them containing different definitions of what to find and what to replace with. The original package contains three definition files, in three different folders: Mac <-> Dos text conversion  ; reformat ¶ / remove accents  ; Upper-lower case.
  39.  
  40. To install the FKEY, you can use your preferred method, or you can use the simple but excellent FKEY installer from Mike Gleason.
  41.  
  42. Where to install the FKEY depends upon your needs and your own strategy. I’ll describe the method for those who have no strategy, because I suppose explanations are superfluous for who has a strategy!
  43.  
  44. • Make a copy of the system file (for back-up)
  45. • Launch the FKEY installer
  46. • Chose ‘Install in system file’ from the menu file
  47. • Open the file Multi Find-Replace FKEY 1.4 
  48. • Notice the FKEY’s number assigned by the installer
  49. • Quit the installer and enjoy!
  50.  
  51. Notes: 
  52. - Because an FKEY is not an Extension (INIT), you don’t need to reboot your Macintosh
  53. - the installer will behave properly if you already have an FKEY with number ‘0’: it will try another number.
  54. - If you have an anti-virus like SAM, it will warn you of the “attempt to create a resource of type FKEY”. Obviously, you must allow this attempt.
  55. -    The FKEY is installed directly in the current system file (not the copy you did for back-up!)
  56.  
  57.  
  58. How to use Multi Find-Replace?
  59. Multi Find-Replace  is assigned originally to number 0. If you have already an FKEY assigned to number 0, replace 0 by your number in the following instrucitons.
  60.  
  61. To perform the Find-Replace on a piece of text, you:
  62.     - copy the text to the clipboard
  63.     - hold down Command-Shift-0
  64.     - locate and open the definition file via the standard Open file dialog
  65.     - paste the text from the clipboard
  66.  
  67. Tip
  68. If the definition file is in your current system folder (not in the preference folder), and if it is named Multi Find-Replace definition, you don’t need to locate and open it!
  69.  
  70. Two conversions are available depending of the status of the Caps lock key.
  71.  
  72. The original conversions for the definition file in the folder Mac <-> Dos text conversion  are:
  73.  
  74. Caps lock Up:     Macintosh    ->    MS DOS
  75. Caps lock Down:    MS DOS    ->    Macintosh
  76.  
  77. During the conversion, the mouse cursor will be the standard watch.
  78.  
  79. In case of problem, your Macintosh will beep:
  80.  
  81.   • 1 beep    ->    user error: clipboard does not contain pure text
  82.   • 3 beeps    ->    system error (definition not found in the file, not enough memory,...)
  83.  
  84. Each definition file contains a short description of the Find-Replace definition. You can read it with any text editor, including TeachText.
  85.  
  86.  
  87. How to customize Multi Find-Replace?
  88. Multi Find-Replace  is ready to use: you don't need to customize it. However, if you need additional conversions, you can customize the definition file using ResEdit.
  89.  
  90. Beware! ResEdit is a powerful tool, up to give you the power to damage your files. However, don’t be afraid to play with it. But even if you feel an expert, make sure you have a back-up of the file you are going to open with ResEdit!
  91.     If you don’t know what is a resource and the basic commands of ResEdit, I suggest you ask somebody else to customize your Multi Find-Replace definition.
  92.  
  93. A single file on your Macintosh desktop is composed of two virtual files: the data fork and the resource fork. In the Multi Find-Replace definition files, the data fork contains the description in plain English, and the resource fork contains the details of what must replace what.
  94.  
  95. The conversions are defined in two resources of type STR#, one for Caps lock Up (nº 1000) and one for Caps lock Down (nº 2000). Strings are considered by pair: string n is replaced by string n+1.
  96.  
  97.  
  98.  
  99. Notes:
  100. -    The first number gives the number of strings, so it is the double of the number of replacements.
  101. -    In this example, <CarriageReturn> is replaced by <CarriageReturn><LineFeed> (the box represents LineFeed). The next conversion replaces ‘Ç’ by ‘Ä’, because on DOS the ‘C’ cedilla is the ASCII 128 (on the Mac, ASCII 128 is ‘Ä’)
  102. -    Any number of conversion can be performed, as long as they are correctly registered in the STR#.
  103. -    The maximum size of text that can be found or replaced with is 255 characters.
  104. -    To remove a piece of text, replace it by an empty string.
  105. -    If an empty string is specified as search target, it will be skipped.
  106. -    There is no logical link between the conversion done with Caps lock Up and Down. (e.g. Mac->DOS changes "…" (single char obtained with <option><;> on US keyboard) to "..." (three dots), but DOS->Mac does not change back "..." (three dots) to "…" (single char))
  107.  
  108. The definition file also includes the type of clipboard to modify, in a resource of type 'CFIG'. A type is an arrary of exactly four bytes. When you copy something to the clipboard, the application stores one or more objects, each of a different type. For example, MS-Word stores three objects, respectively of type 'CLAP', 'RTF ' (notice the space to make four char) and 'TEXT'. You can see the type of the object(s) in the clipboard if you paste in the Scrapbook (watch the bottom-right corner).
  109.  
  110. If I receive lots of feed-back, I'll improve Multi Find-Replace  according to your suggestions. For now, my ideas would be:
  111. •    easier way to change the STR#, directly, not using ResEdit.
  112. •    alert messages in case of error, instead of beeps
  113.  
  114.  
  115. Known problem:
  116. This FKEY has been developed and tested with system 6.0.4 and 7.0.1. No problem has been found with any application and desk accessory, excepted with Word 4.0. 
  117. This is because Word 4.0 does not recognize that the clipboard has changed when you paste the result. Word 4.0 has the same problem with most of the DA and FKEYs.
  118.  
  119. Microsoft partially solved the problem with Word 5.0. If what you paste is the original text, or if the FKEY beeps, switch to another application (MultiFinder or System 7 users can just click on the desktop to show the Finder, non MultiFinder users can open a desk accessory), activate the FKEY, and return to MS-Word. (this simple trick was not sufficient with Word 4: you had to paste on another application or DA (e.g. Scrapbook) and re-copy).
  120.  
  121.  
  122. What does Multi Find-Replace cost?
  123. Multi Find-Replace  is “Drinkwale”. If you use it, you must open a bottle of a good wine, drink well, and send to me the label. Of course, you can also send more than one label (or even the wine...), but only wine, and if possible good or from limited production.
  124.  
  125. Note that I ask you to drink well, not to drink much!
  126.  
  127. Gaspard Gendreau
  128. ESRIN, via G. Galilei
  129. Frascati 00044
  130. ITALY
  131.  
  132. e-mail:
  133. Internet:    gaspard@macgas.esrin.esa.it
  134. SPAN:    ESIS::gaspard
  135. Bitnet:    ggendrea@esrin.bitnet
  136. X.400:    C=it; ADM=master400; PR=esrin; ORG=span; UNIT=esis; SUR=gaspard
  137. bix:    ggendreau
  138.  
  139.  
  140. Please distribute original Multi Find-Replace  to anybody you want, but do NOT charge for it, excepted for reasonable participation of the duplication costs. You MUST distribute the original version and this Read me file. However, you may distribute Multi Find-Replace  with a customized succession of changes (STR#), if you feel useful.
  141.  
  142. If you put Multi Find-Replace  on bulletin boards, I would appreciate if you send me an e-mail.
  143.  
  144. If you create new definition files, keep the convention to describe briefly in the data fork what are the changes.
  145.  
  146. Although Multi Find-Replace  is free, it is not in the public domain.
  147.  
  148. Multi Find-Replace  is as it is. Use at your own risk; I offer no warranty of any kind. As specified before, Multi Find-Replace  is Drinkwale: please don’t miss to send me wine labels if you use it.
  149.  
  150. If I find bug or make any improvement, I might send a copy via electronic mail to the registered users who have given an electronic address and who were particularly generous with the kind of wine labels they've sent...
  151. If you want the source code, please send me something of your cru and give an electronic address for destination. I won’t normally send floppies via post mail from Italy, unless I receive a floppy from you with valuable stuff.
  152.  
  153.  
  154. Credit
  155. Multi Find-Replace  is based on the Think Pascal source example FKEY BlockComment.
  156. Multi Find-Replace  was written with Think Pascal version 2.
  157. FKEY installer from Mike Gleason
  158.  
  159. Trademarks from each company.
  160.  
  161. Multi Find-Replace Registration / Comment form
  162.  
  163. Name:
  164. _________________________________________________________
  165. Address:
  166. _________________________________________________________
  167.  
  168. _________________________________________________________
  169.  
  170. _________________________________________________________
  171.  
  172. _________________________________________________________
  173.  
  174. _________________________________________________________
  175.  
  176.  
  177. Electronic Addresses:
  178.  
  179. Internet: _______________________ SPAN: ________________________
  180.  
  181. X.400: ________________________________________________________
  182.  
  183. Other:    ________________________________________________________
  184.  
  185.     ________________________________________________________
  186.  
  187.     ________________________________________________________
  188.  
  189.  
  190.  
  191.  
  192. Comments:  
  193.